audio_form object

This method will return the type of a given control (See control type constants).

int get_control_type(int control_id)

Parameters:
control_id
The control ID to retrieve the type from.

Return value:
The control type on success, or -1 on failure.

Remarks:
This function is useful for checking if you can perform a specific operation on the control.

Example:
// Make a simple form with a few buttons.

#include "form.bgt"

audio_form form;

void main()
{
form.create_window("Example Form", true);
int ok=form.create_button("OK");
int cancel=form.create_button("E&xit");
while(true)
{
form.monitor();
wait(5);
if(form.is_pressed(ok))
{
alert("Information", "The control type of OK is "+form.get_control_type(ok));
exit();
}
if(form.is_pressed(cancel))
{
exit();
}
if((key_down(KEY_LMENU))&&(key_pressed(KEY_F4)))
{
exit();
}
}
}